<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../common/include.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>分类</title>
</head>
<body>
	<div id="categoryTree"><div>
		<ul class="simpleTree">
			<li class="root"><span>分类列表</span>
				<ul class="open">
					<c:forEach items="${list}" var="cate">
						<li id='<c:out value="${cate.id}"/>'><span><c:out value="${cate.name}" /></span>
							<ul class="ajax">
								<li>{url:category/<c:out value="${cate.id}" />}
								</li>
							</ul></li>
					</c:forEach>
				</ul></li>
		</ul>
	</div></div>
</body>
<script type="text/javascript">
var simpleTreeCollection;
var cateid=0;
var catename=$('#cateName').attr('value');
$(document).ready(function(){
	simpleTreeCollection = $('.simpleTree').simpleTree({
		autoclose: true,
		afterClick:function(node){
			f_afterClick(node);
		//$("#add").attr("href","category.do?action=load&id="+node.attr('id')+"&pCateName="+$('span:first',node).text()+"&height=300&width=300");
		//$("#modify").attr("href","category.do?action=load&method=edit&id="+node.attr('id')+"&pCateName="+$('span:first',node).text()+"&height=300&width=300");
		//$("#delete").attr("href","category.do?action=delete&id="+node.attr('id')+"&pCateName="+$('span:first',node).text());
		},
		afterDblClick:function(node){
			f_treeDblClick(node);//location.href="category.do?action=load&id="+node.attr('id')+"&pCateName="+$('span:first',node).text()+"&height=300&width=300";
		},
		afterMove:function(destination, source, pos){
		},
		afterAjax:function()
		{
		},
		animate:true
	});
})
</script>	
</html>
